router: add config to reject requests with invalid envoy headers#7323
Merged
mattklein123 merged 11 commits intoenvoyproxy:masterfrom Jul 2, 2019
Merged
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Before this change, Envoy would ignore invalid
x-envoy-*header values from aclient request (e.g.
x-envoy-max-retries: 3.0), silently falling back to thedefault value for that header. Introduce a
strict_check_headersconfig optionfor
envoy.routerthat adds optional support to explicitly reject requests withinvalid values for the following headers:
On rejection, Envoy responds with HTTP status 400 and sets a new response flag
IHto indicate the reason was due to an invalid header.Risk Level: Low/medium
Testing: unit tests
FilterUtility::StrictHeaderCheckerIHresponse flagclient -> envoy -> upstream serverto verify thatEnvoy returns a 400 and sets the response flag in the logs
Docs Changes:
router.protoforstrict_check_headersaccesslog.protoforIHresponse flagRelease Notes: updated for router and accesslog
Fixes #6482